1. Field of the Invention
This invention relate to an image reading method and apparatus for regenerating image data read by an image reading apparatus such as a hand-scanner on an image storage means. More specially, this invention relates to an image data reading apparatus and method able to perform a scanning freely, and to regenerate an image data with high quality in a high speed.
2. Description of the Prior Art
An image scanning apparatus used for reading image data in a flatbed type is generally arranged that an image reading sensor set a plurality of reading elements in a line moves in a specific speed in a vertical direction against the elements arraying direction of the image reading sensor. Under the arrangement, each element scans with a pulse of specific period in a line reading direction (a main scanning) and also scans in a moving direction (a sub scanning), as a result an image data can be acquired from each element. Furthermore, the image data thus obtained is synchronized with the acquisition timing and written into an image data storage means (hereinafter the processing is represented as xe2x80x9cmapxe2x80x9d).
In the above constitution acquisition positions of the image data may be arrayed equally on two axes which make a right angle, that is, in the main scanning direction and the sub scanning direction. Moreover in this case, since each synchronous signal of the main scanning direction and the sub scanning direction synchronizes with the position signals sent to the image storage means, each acquisition position of the image data can be corresponded at one-to-one to each pixel mapping position in the image storage means. Therefore, it can be easy to acquire the image data with high quality.
Besides the image scanning apparatus of the above flatbed type, the applicant of the present invention developed an image reading apparatus of a free scanning type (hereinafter represented as a free scanning apparatus) which is disclosed in the Japanese laid-open publication No. H08-241393. It is possible for the free scanning apparatus to acquire an image data by operating the image reading sensor over an original by hand.
FIG. 28 shows the first step of the reading procedure for an original using the free scanning apparatus. The free scanning apparatus is provided with a wheel 52 and 53 outside each end of the image reading sensor 51. The free scanning apparatus can read the image data not only in a straight line direction shown as the scanning 341, but also in a curvilinear direction that the wheels rotate in reverse, which is shown as the scanning 342.
Namely, it is possible to read the ABCD area by the scanning 341, and the BEFC area by the scanning 342. The BEGC area, which is read out above the other at this time, is represented as an overlapped area hereinafter.
And the direction of a straight line AD, which the reading elements are arrayed on and connects the ends of the image reading sensor 51, is defined as a main scanning direction, while the wheel advancing direction is as a sub scanning direction. Accordingly, the sub scanning direction of the free scanning apparatus does not become a fixed linear direction as shown in the image scanning apparatus of flatbed type.
Therefore, in order to clear the coordinates, a position at which the image reading sensor 51 starts to reading is defined as a reference position, the reading elements arraying direction of the image reading sensor 51 at the reference position is defined as a Y axis, and an axis which is vertical to the Y axis is defined as a X axis. By operating the free scanning apparatus freely, it is possible to read an image data of an arbitrary position for the width of the image reading sensor. A right direction from the reference position is defined as a X positive direction, a downward direction from the reference position is defined as a Y positive direction, and thereby the explanation will be given as follows. FIG. 29 shows the second step of the reading procedure for an original, and the EHJF area is read out by performing the scanning 345 after the scanning of the first step shown in FIG. 28.
When the free scanning apparatus as described above reads an image data by a return-back scanning the mapping errors are generated and exert an influence upon the picture quality of the image data Referring to FIGS. 30 and 31, the mapping errors will be explained hereinafter.
FIG. 30 shows an illustrated diagram indicating an example of the mapping errors. The white dot 351 represents a pixel position on the image data storage means to be mapped (that is called a mapped pixel position hereinafter), a black dot 352 represents a pixel position corresponding to each element on the image reading sensor 51, and an arrow 357 represents a sub scanning direction Here, if the read-out pixel position is coincident with the mapped pixel position, the mapping errors (the difference between the white dot position and the black dot position) will not occur.
However, it almost occurs in case of the free scanning that the read-out pixel position is not identical with the mapped pixel position, which is shown as the read-out positions 355 and 356. But if the scanning position is almost horizontal or almost vertical to the array of the mapped position as shown in FIG. 30, there is not so much deterioration of the picture quality because it occurs the mapping errors with very few difference between the read-out pixel position and the mapped pixel position at each element of the image reading sensor 51.
FIG. 31 is an explanatory diagram showing the other example of generating the mapping errors. In case of a scanning with a slant shown as an arrow 363, the difference between the read-out pixel position and the mapped pixel position becomes large at each element of the image reading sensor 51 and the mapping errors is generated sharply. Consequently the picture quality deteriorates radically.
Therefore, the image data of the ABCD area mapped at the time of the scanning 341 in FIG. 28 had better not to be overwritten by the image data of the BEFC area generated by the scanning 342 (a scanning in the X negative direction) after the turn-back
There is a method which does not perform the mapping by the scanning 342 in the X negative direction, but in case that the scanning finishes at the scanning 342 in the X negative direction it occurs that the read-out image data are not be mapped. And as it exerts an influence upon the image synthesis, that method is not preferable.
In the conventional apparatus, the information that the mapping has already finished or not (called a scanning information hereinafter) is stored using a scanning flag as shown in FIG. 32 or one of gradations as shown in FIG. 33 (of which the initial status is represented by the gradation 255, accordingly in case of performing the mapping the gradation is one except 255). If the scanning flag stands or the gradation excluding a specific one is represented, the mapping has already finished. Accordingly, in case of the scanning 342 in the X negative direction, it can be arranged that the mapping in the overlapped area is not performed.
On the contrary, in case of the scanning 345 in X positive direction again as shown in FIG. 29, it is preferable to rewrite the GFC area shown in FIG. 28 because the picture quality gets better.
However, if the mapping in the X negative direction is restricted by determining to perform the mapping according to whether the scanning flag stands or the gradation is a specific one, the picture quality is improved. But it takes much time to read out the scanning information from the image data storage means (for instance, an image data memory), therefore there is a problem that the time for the mapping processing increases.
In general, since the mapping positions are not arranged consecutively on the image data memory, the access to the memory is a randam access. And in case of using SDRAM (Synchronous DRAM), the time for the reading of the scanning information is longer than that for the writing the scanning information into the memory because of the latency (the latency time for reading), which exerts many influence upon the whole time of the mapping processing.
The present invention is proposed to resolve the above problems, and has an object to provide an image reading method and apparatus able to perform the mapping processing with high quality in high speed without using the scanning information in the image storage means.
To achieve the above objects, the present invention adopts the following means.
This invention is provided with a free scanning apparatus (not shown) comprising an image reading sensor 51 on which a plurality of reading elements are set in an array. When the free scanning apparatus scans over an original in an arbitrary direction, image reading means 6 generates image data corresponding to said each reading elements in accordance with signals detected by a plurality of reading elements. Besides, according to a moving amount of the free scanning apparatus, position information generating means 2 calculates position information corresponding to said each image data. Said each image data is mapped in image data storage 8 according to the position information. Here, the position information corresponding to each reading elements of the image reading sensor 51 are identical substantially with one of image data obtained from each elements of the image reading sensor 51, that is, pixels.
First scanning direction detecting means 3 detects a scanning direction of the free scanning apparatus in accordance with the position information of both ends of the image reading sensor 51. And, where the read starting position represents a reference position, a reading elements arraying direction at the reference position is defined as a Y axis and a direction vertical to the Y axis as a X axis, in accordance with scanning direction signals outputted from the first scanning direction detecting means 3 and the position information of one or both ends of the image reading sensor 51, when the free scanning apparatus scans in the X positive direction for one section, first boundary detecting means 4 generates a boundary vertical to at least either one of the X axis or the Y axis within the mapping area.
And the reference position can be reset arbitrarily on the way of the scanning.
And first boundary comparing means 5, when the free scanning apparatus scans in the X negative direction in accordance with the scanning direction signals, said means compares boundary signals outputted the first boundary detecting means 4 and the position information of the image reading sensor 51. Mapping means, when the image data is mapped on the image data storage 8 in accordance with the position information of the image reading sensor 51, determines whether the mapping is performed or not in accordance with comparing signals outputted from the first boundary comparing means 5.
Namely, in the present invention, when the free scanning apparatus scans for a section in the X positive direction, a boundary vertical to at least either one of the X axis or the Y axis is generated within a mapping area in accordance with the position information of one or both ends of the image reading sensor generated by the position information generating means and when the free scanning apparatus scans in the X negative direction, only a part outside the boundary generated by the one section scanning is mapped.
Therefore it is not necessary to read a scanning flag or a specific gradation indicating whether the mapping has been performed or not, and it is possible to perform the mapping with high quality in high speed.
In this case, it may be arranged that the scanning in the X negative direction includes that one end of the image reading sensor moves in the X positive direction and the other end moves in the X negative direction. Thereby, it is possible to determine accurately the scanning direction in case of the rotational scanning of the reading sensor.
And to achieve the above objects there is another method arranged as shown a block diagram in FIG. 17. In this apparatus, the components of the image reading means 6, the position information generating means 2 and the image data storage 8 are the same as in the first apparatus, but forward direction detecting means 232 determines a forward direction of the free scanning apparatus in accordance with the position information of both ends of the image reading sensor 51 for a specific section, second scanning direction detecting means 231 detects a scanning direction of the free scanning apparatus in accordance with the position information of both end of the image reading sensor 51 and forward direction signals outputted from the forward direction determining means 232.
Where a reading elements arraying direction of the image reading sensor 51 at the reference position is defined as a Y axis and a direction vertical to the Y axis as a X axis, in accordance with the forward direction signals, scanning direction signals outputted from the second scanning direction detecting means 231 and the position information of both ends of the image reading sensor 51, if the scanning apparatus is determined to move for one section in the forward direction, second boundary detecting means 233 generates a boundary vertical to at least one of the X axis or the Y axis within the mapping area.
And second boundary comparing means 234, if the free scanning apparatus is determined to move in reverse direction according to the scanning direction signals, said means compares boundary signals outputted from the second boundary detecting means 233 and the position information of the image reading sensor 51. Mapping means, when the image data is mapped on the image data storage 8 in accordance with the position information of the image reading sensor 51, determines whether the mapping has been performed or not according to comparing signals outputted from the second boundary comparing means 234.
In the present invention, the forward direction of the scanning is determined in accordance with the moving amount for specific sections in the X axis direction, and when the free scanning apparatus scans in the forward direction for a section, a boundary vertical to at least either one of the X axis or the Y axis is generated within a mapping area in accordance with the position information of one or both ends of the image reading sensor, and when the free scanning apparatus scans in the reverse direction only a part outside the boundary generated by said one section scanning is mapped, that is, it is possible to carry out the mapping even if the linear scanning is performed in either direction right or left from the reference position
And at this time, the scanning in reverse direction to the X axis may be arranged to include the moving of one end of the image reading sensor 51 in the X positive direction and the moving of the other end of the image reading sensor 51 in the X negative direction. Therefore, it is possible to determine accurately the scanning direction in case of the rotational scanning of the reading sensor.
And FIG. 24 shows the third image reading apparatus of the present invention wherein the image reading means 6, the position information generating means 2 and the image data storage are the same as in the first and the second apparatus. In this apparatus, slant scanning detecting means 311 detects the slant against the reference position of the free scanning apparatus according to the position information of both ends of the image reading sensor 51. Where a reading elements arraying direction at the reference position is defined as a Y axis and a direction vertical to the Y axis as a X axis, third boundary detecting means 312 detects a slant of the free scanning apparatus against the reference position in accordance with the position information of both ends of the image reading sensor 51 and slant scanning signals outputted from the slant scanning detecting means 311, and if the slant value is under a specific value, said means generates a boundary vertical to at least one of the X axis or the Y axis within the mapping area for one section.
And third boundary comparing means 313 compares boundary signals outputted from the third boundary detecting means 312 and the position information of the image reading sensor 51 in accordance with the slant scanning signals. And the mapping means 7, when the image data is mapped in the image data storage according to the position information of the image reading sensor, determining whether the mapping is performed or not in accordance with comparing signals outputted from the third boundary comparing means 313.
Namely, in the present invention, the slant of the free scanning apparatus to the reference position is detected in accordance with the position information of both ends of the image reading sensor 51 at the time of the scanning of the free scanning apparatus. If the slant value is under the specific value, a boundary is generated in vertical to either one of the X axis or the Y axis within the mapping area for one section, and if the slant is over the specific value, only the part outside the boundary is to be mapped. Thereby, it is possible to carry out the mapping in case of the special scanning shown as in FIG. 25, and to regenerate the image data with high quality. In this case, when the slant of the free scanning apparatus is detected, the slant information is arranged to be generated in accordance with two threshold values, thereby the change of the boundary based on the slight slant can be avoided.
And it is arranged in each method and apparatus of the present invention that, in order to control the mapping in detail, only the parts outside the combined boundary generated by the scanning for a plural sections is to be mapped. In a result, the picture quality can be improved.
And the boundary may include a boundary which is generated in vertical to the Y axis in accordance with a minimum value of Y coordinate, within the scanning for one section of an end of the sensor having a larger value of Y coordinate at the reference position than the other end.
The boundary may also include a boundary which is generated in vertical to the Y axis in accordance with a maximum value of Y coordinate, within the scanning for one section of an end of the sensor having a smaller value of Y coordinate at the reference position than the other end.
The boundary may also include a boundary which is generated in vertical to the X axis in accordance with a lager value of X coordinate of an end of the sensor at the scan starting position within the one section than the other end.
The boundary may further include a boundary which is generated in vertical to the X axis in accordance with a smaller value of X coordinate of one end of the sensor at the scan starting position in the X negative direction within the one section than the other end.
The determination of the scanning direction of the free scanning apparatus is arranged to be performed if the scanning is over a specific moving amount or over a specific time for reading accordingly, it is possible to avoid the influence of the delicate change such as the quivering of hands.
As described above, since the image reading method and apparatus of the present invention is arranged, in order to determine whether the mapping has been performed or not, that the mapping processing is performed generating the boundary, it is not necessary to read the scanning flag or determine the specific gradation. Therefore, it is possible to obtain the effect that the mapping processing can be carried out with high quality at high speed. And since the section to generate the boundary can be changed flexibly detecting the forward direction for the scanning of the free scanning apparatus, it is possible to regenerate the image data with high quality not only in the X positive direction, but also in the scanning based on the X negative direction. Therefore, it is possible to expand the scanning method to obtain the image data with high quality. At these cases, by the scanning in the X negative direction including the movement of one end of the image reading sensor in the X positive direction and of the other end of the image reading sensor in the X negative direction, it is possible to determine the scanning direction even if the sensor performs the rotational scanning. And under the arrangement of detecting the slant of the free scanning apparatus, it is possible to correspond to the special scanning and the image data with stability can be obtained. Furthermore, since the mapping area deteriorated because of the slant scanning of the free scanning apparatus can be overwritten by the mapping of the linear scanning, it is possible to obtain the picture quality with high accuracy. At the time of detecting the slant of the free scanning apparatus, the slant information is generated in accordance with two threshold values, therefore it is possible to avoid the change of the boundary because of the delicate slant. In each method and apparatus of the present invention, since the combined boundary is generated synthesizing boundaries based on the scanning for a plural sections, the boundary can be set in detail. Therefore it is possible to to avoid to perform the unnecessary mapping and it is possible to obtain the effect that the time of the mapping can be shorten. And since the determination of the scanning direction of the free scanning apparatus is arranged to be performed if the scanning is over a specific moving amount or over a specific time for reading, it is possible to avoid the influence of the delicate change such as the quivering of hands.